package ink.metoo.auto.fishpi.job

import ink.metoo.auto.fishpi.Log
import org.quartz.Job
import org.quartz.JobExecutionContext

interface RunnableJob : Job, Runnable {

    override fun execute(context: JobExecutionContext?) = try {
        run(context)
    } catch (e: Exception) {
        Log.error(e.message, e)
        throw e
    }

    fun run(context: JobExecutionContext?) = run()

}